<include file="Common:header" />
<div class="layui-card layadmin-header"> <span class="layui-breadcrumb" lay-separator="/"> <a href="{:U('Index/welcome')}">首页</a><a href="{:U('User/index')}">用户管理</a> </span> </div>

<div class="layui-fluid pt-10 pr-10 pl-20">
	<table class="layui-table">
		<thead>
			<tr>
				<th>ID</th>
				<th>用户名</th>
				<th>权限</th>
				<th>状态</th>
				<th style="text-align:center">单项操作</th>
			</tr>
		</thead>
		<tbody>
			<foreach name="data" item="val">
				<tr>
					<td>{$val['id']}</td>
					<td>{$val['username']}</td>
					<td>{$val['grantHtml']}</td>
					<td>已{$val['status']?'启用':'禁用'}</td>
					<td style="text-align:center"><div class="layui-btn-group"><a class="layui-btn layui-btn-primary layui-btn-sm" href="{:U('User/add',array('id'=>$val['id']))}"><i class="layui-icon layui-icon-edit"></i>编辑</a><a class="layui-btn layui-btn-primary layui-btn-sm" onClick="return confirm('确定要删除吗?');" href="{:U('User/delete',array('id'=>$val['id']))}"><i class="layui-icon layui-icon-delete"></i>删除</a><a class="layui-btn layui-btn-primary layui-btn-sm" href="javascript:if (confirm('确定重置密码{:C('DEFAULT_PASSWORD')}?')) location='{:U('User/reset',array('id'=>$val['id']))}'"><i class="layui-icon layui-icon-refresh"></i>重置密码</a><a class="layui-btn layui-btn-primary layui-btn-sm" href="{:U('User/grant',array('id'=>$val['id']))}"><i class="layui-icon layui-icon-auz"></i>分配权限</a></td>
				</tr>
			</foreach>
		</tbody>
	</table>
</div>
<script>
layui.use(['element'], function(){});
</script>
<include file="Common:footer" />